Jx.categorize('unit.integer', {

	$extend: 'unit.scalar',

	$helpers: {

		'Number': 'Jx.lib.Number'

	},

	$accessors: {

		value: 0

	},

	allowSetValue: function(operation, value){
		
		if (Jx.isString(value, true) && this.numericRe.test(value)){
			
			value = parseFloat(value);
			
		}

		return Jx.isNumber(value) && void( operation.value = Math.round(value) );

	},

	toString: function(radix){

		var num = this.getValue.apply(this,

				Array.prototype.slice.call(arguments, 0)

			);

		return num.toString(

			Jx.isNumber(radix) ?

				radix

				:

				10

		);

	},

/**
 *	utilities
 */

	count: function(){

		return this.$Number.count( this.value() );

	}


});
